import { Util } from "./utils/Util";

export default class GlobalData {

    private static _instance: GlobalData = null;
    public static get inst(): GlobalData {
        return this._instance || (this._instance = new GlobalData());
    }

    showCheat: boolean = false;
    useNetWork: boolean = true;

    version: string = "1.250428.1310";

    tempHide: boolean = Util.isIOS()? false : false;

    isLoginFrist: boolean = true;

    notice_title: string = "";
    notice_desc: string = "";
    token: string = "";
    userid: string = "";
    notice_desctoken: string = "";
    uid: string = "";
    findMe: boolean = false;
    findMe_prize: boolean = false;
    user_nickname: string = "";
    userinfo: Record<string, any> = null;
    diamond: string = null;
    coin: string = null;
    agent_uid: string = ''
    shareagent_uid: string = ''
    diffbattle: number = 0;
    user_certverify_preconsult: number;
    id_card_no: string = '';
    user_name: string = '';
    real_name_authentication: number;
    zfbAuthentication: number;
    create_time = '';
    is_kickback = '1';
    equipmentid_adv_viewed_num = 0;

    provincecode: 0;
    tiaozhandata = { default_gunId: 105, battle: 0, uid: "", baseAllHp: 300, type: "rank", island_id: "0" }

    isShowotice: boolean = false;

    istixian: number = 0;

    isChaet: boolean = false;

    isTableScreen: boolean;
    
    dl_qrcode = '';

    isLoadAdFail: boolean = false;

    isKuaishouInterstitialAd = true; //是否快手插屏广告
    is_alipay_transfer: boolean = false;//支付宝提现按钮
    is_huifu_transfer: boolean = false;//汇服八方提现
    device_id= '';//设备id

    init() {
        GlobalData._instance = new GlobalData();
    }
}